<template>
  <div class="realtimeprice">
    <!--工具条-->
    <el-col
      :span="24"
      class="toolbar"
      style="
        padding-bottom: 10px;
        display: flex;
        justify-content: space-between;
      "
    >
      <el-form :inline="true">

      </el-form>
   <el-form :inline="true" style="display:flex;align-item:center;">
       <excelexport></excelexport>
      </el-form>
    </el-col>

    <el-table
      :data="websocketData"
      id="out-table"
      style="width: 100%">

     <el-table-column
        prop="id"
        label="id"
        width="180">
      </el-table-column>

      <el-table-column
        prop="feed_code"
        :label="$t('realtimeprice.digitalcurrencys')"
        width="180">
      </el-table-column>
      
      <el-table-column
        :label="$t('realtimeprice.Purchaseprice')"
        width="180">
            <template slot-scope="props">
                {{
              websocketDataps[props.row.feed_code]['b1']
                }}
            </template>
      </el-table-column>

      <el-table-column
        prop="address"
        :label="$t('realtimeprice.Sellingprice')">
        <template slot-scope="props">
                {{
        websocketDataps[props.row.feed_code]['s2']
                }}
            </template>
      </el-table-column>

 
    </el-table>
  </div>
</template>

<script>
import excelexport from "@/components/export.vue";
import { mapState, mapMutations } from "vuex";


export default {
    name:'realtimeprice',
      components: {
    excelexport,
  },
    data(){
        return{
          // websocketData:[],
          // websocketDataps:{}
        }
    },
    computed: {


        websocketData(){
         return this.$store.state.websocketData
      },

       websocketDataps(){
          return this.$store.state.websocketDataps
      },
    
    
      },
      
      
    methods:{
    
    },

    mounted(){
      // console.log(this.$store.state.websocketData)

    // this.$store.dispatch("getsdecimallength");
    
    }
}
</script>

<style>



</style>